summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-11-07 13:01:27 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2022-11-07 13:01:27 +0100
commit329e6e8cd8c4b01879fb78057dba957036c3bfad (patch)
treea804e59c7fd149fe18ac703b956dd963d48ce1e4
parentit's possible that thumbnailURL does not exist (acsm id 217679) (diff)
downloadbiblos-stat-329e6e8cd8c4b01879fb78057dba957036c3bfad.tar
biblos-stat-329e6e8cd8c4b01879fb78057dba957036c3bfad.tar.gz
biblos-stat-329e6e8cd8c4b01879fb78057dba957036c3bfad.tar.bz2
biblos-stat-329e6e8cd8c4b01879fb78057dba957036c3bfad.tar.lz
biblos-stat-329e6e8cd8c4b01879fb78057dba957036c3bfad.tar.xz
biblos-stat-329e6e8cd8c4b01879fb78057dba957036c3bfad.tar.zst
biblos-stat-329e6e8cd8c4b01879fb78057dba957036c3bfad.zip
-rwxr-xr-xgather.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gather.py b/gather.py
index d4beec6..2992ae0 100755
--- a/gather.py
+++ b/gather.py
@@ -73,7 +73,7 @@ try:
acsm_id = force_acsm_id
force_acsm_id = 0
else:
- borrow = session.scalars(select(Borrow).order_by(Borrow.id.desc())).first()
+ borrow = session.scalars(select(Borrow).order_by(Borrow.id.desc()).limit(1)).first()
acsm_id = starting_acsm_id
if borrow is None:
logger.info(f"oooh, it looks like this is a fresh start, db contains no borrows. I'll start with hardcoded acsm id {starting_acsm_id}")